package fr.pentalog.ctc.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

import fr.pentalog.ctc.dao.MyItemDao;
import fr.pentalog.ctc.service.MyItemService;

import ro.peoplecentric.ctc.common.entity.Item;
import ro.peoplecentric.ctc.common.exception.ApplicationException;

/**
 * @author Danut Chindris
 * @since September 22, 2013
 */

@Service
@Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = {ApplicationException.class, DataAccessException.class})
public class MyItemServiceImpl implements MyItemService {

	@Resource
    private MyItemDao myItemDao;

	public List<Item> getAllItems(String order, String orderBy) throws ApplicationException {
        return myItemDao.getAllItems(order, orderBy);
    }
}
